extends "usercenter/base.html"

block content
	.col-md-3 &nbsp;
	.col-md-6
		.hidden-xs.alert.alert-success.text-center
			p
				h5 注册
				span "呦!今天你来看小说么?"
				br
				span "填完了赶进去收藏一些吧!"
		.well
			form#login-form.form-horizontal(role='form', action='.', method='post')
				| {% csrf_token %}
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_captcha') 验证码
					#CAPTCHA.col-sm-10(data-url="{% url 'captcha-refresh' %}")
						| {{form.captcha}}
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_username') 用户名
					.col-sm-10
						input#id_username.form-control(maxlength='30', name='username', type='text', value="{{form.username.value|default:''}}")
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_email') Email
					.col-sm-10
						input#id_email.form-control(maxlength='30', name='email', type='text', value="{{form.email.value|default:''}}")
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_password1') 密码
					.col-sm-10
						input#id_password1.form-control(name='password1', type='password')
				.form-group(class='{% if form.errors %}error{% endif %}')
					label.share-label.col-sm-2(for='id_password2') 校验密码
					.col-sm-10
						input#id_password2.form-control(name='password2', type='password')
				input(type='hidden', name='this_is_the_signup_form', value='1')
				input(type='hidden', name='next', value='{{ next }}')
				button#signup.btn.btn-large.btn-primary.btn-block(type='submit') 注册
				if form.errors
					.alert.alert-danger.text-center
						if form.captcha.errors
							p 验证码错误
						if form.username.errors
							p 用户名已存在
						if form.email.errors
							p Email已存在
						if form.password1.errors
							p 请填写密码
						if form.password2.errors
							p 密码不一致
	.col-md-3 &nbsp;
